<template>
  <view class="content">
    <view class="components-title">
      <view class="components-title-t">gg-radio-sex</view>
      <view class="components-title-d">性别选择</view>
    </view>
    <gg-nav-group label="单选框">
      <gg-radio-sex label="性别" :tip="tip" v-model="formData.sex" message="请选择性别" :unsecrecy="false" must />
      <gg-radio-sex label="性别" :tip="tip" v-model="formData.sex" message="请选择性别" :unsecrecy="false" layout="col" />
    </gg-nav-group>
    <gg-nav-group label="无保密选项">
      <gg-radio-sex label="性别" :tip="tip" v-model="formData.sex" message="请选择性别" :unsecrecy="true" must />
      <gg-radio-sex label="性别" :tip="tip" v-model="formData.sex" message="请选择性别" :unsecrecy="true" layout="col" />
    </gg-nav-group>
  </view>
</template>

<script>
export default {
  data() {
    return {
      tip: '请选择您的性别',
      formData: {
        sex: '',
      }
    };
  },
  onLoad() {
    setTimeout(() => {
      this.testReqMocck().then((res) => {
        this.formData.sex = "男"
      });
      console.log('模拟请求数据', this.formData, this.name);
    }, 1000)
  },
  methods: {
    bindTimeChange(e) {

    },
    clickTest(e) {
      console.log(this.formData.checkboxtag)
    },
    testReqMocck(testData) {
      return new Promise((resolve, reject) => {
        resolve({
        });
      });
    }
  }
}
</script>

<style>
page {
  background: #f1f1f1;
}
</style>
